package vo
{
	
	[RemoteClass(alias="vo.ContactVO")]
	
	[Bindable]
	public class ContactVO
	{
		public var idx:String;
		public var orgText:String;
		public var divideJaso:String;
		public var hit:String;
		public var prvFindTime:String;
		public var average:String;
		public var fstWriteTime:String;
		public var fstWriteUserId:String;
		public var txtCandy:String;
		
		//public var diffTime:String;
		//public var diffDay:String;
		
		public var tmp_diffDay:String;
		public var tmp_diffTime:String;
		
		public var diff:String;
		
		public function ContactVO()
		{
		}
		
		
		public function set diffDay(val:String):void {
			tmp_diffDay = val;
		}
		
		public function set diffTime(val:String):void {
				tmp_diffTime = val;
				
				var iDiffDay:uint 		= int(tmp_diffDay) - 1;
				var sDiffTime:String	= tmp_diffTime;
				var sDiff:String="";
				if(iDiffDay > 0) {
					sDiff = iDiffDay + "일 "; 
				}
				//00000:00:12
				var iFirstPosition:uint = sDiffTime.indexOf(":");
				var iHours:int = parseInt(sDiffTime.substring(0, iFirstPosition));
				var onlyHour:int = iHours%24; 
				
				if(onlyHour > 0 ) {					
					sDiff = sDiff + onlyHour + "시간 "
				}
				
				
				if(sDiffTime.substring(iFirstPosition+1, iFirstPosition+3) != "00") {
					sDiff = sDiff + sDiffTime.substring(iFirstPosition+1, iFirstPosition+3) + "분 "
				}
				if(sDiffTime.substring(iFirstPosition+4, iFirstPosition+6) != "00") {
					sDiff = sDiff + sDiffTime.substring(iFirstPosition+4, iFirstPosition+6) + "초 "
				}								
				sDiff = sDiff  + "전";
				diff = sDiff;			
				trace("iDiffTime : " + sDiffTime);			
		}
		
		public function get getDiff():String {
			return diff;
		}
	
		
	}
}